package com.bestcem.xm.label.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * @author ming.xue <ming.xue@idiaoyan.com>
 * @desc 应用配置
 * @date 2021-05-25
 */
@Configuration
@ConfigurationProperties(prefix = "app.label")
public class LabelAppConfig {
    /**
     * 测试环境
     */
    public static final String ENV_TEST = "test";

    /**
     * 生产环境
     */
    public static final String ENV_PROD = "prod";

    /**
     * 运行环境
     */
    private String env = LabelAppConfig.ENV_PROD;

    /**
     * 是否为测试环境
     *
     * @return
     */
    public boolean isTestEnv() {
        return LabelAppConfig.ENV_TEST.equalsIgnoreCase(env);
    }

}
